package net.northcoding.fresh;
// @Author Diamond - Administrator
// @Date 2023/12/8 10:19:39

import net.northcoding.fresh.lexer.Lexer;
import net.northcoding.fresh.parser.Parser;
import net.northcoding.fresh.token.Token;
import net.northcoding.fresh.util.Logger;

import java.util.Vector;


public class HLang {
    public static void main(String[] args) throws Exception {
        Logger logger = new Logger("main@Fresh", "D:\\code\\Java\\others\\Fresh\\code\\output.log");
        logger.info("Starting Build......");
        for (int i = 0; i < 100000; i++) {

            if (!(args.length < 1)) {
                Vector<Token> tokens_t = Lexer.lexerFile(args[0]);
                Vector<Token> tokens = new Vector<>(tokens_t.subList(0, tokens_t.size() - 1));
                Parser.parser(tokens).exec();
            } else {
                logger.error("No input File");
            }
        }
    }
}
